package com.hsnn.medstgmini.base.std.model;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.hsnn.medstgmini.base.dict.model.DicPhar;


/**
 * StdDruginfoDetail entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name="std_druginfo_detail")

public class StdDruginfoDetail  implements java.io.Serializable {


    // Fields    

     private String drugId;
     private Short drugAttr;
     private Integer drugIndex;
//     private String pharId;
     private DicPhar phar;
    

	private Short patternType;
     private Short drugSource;
     private Short isLowprice;
     private Short isAgriculture;
     private Short isHealthcare;
     private String drugStdCode;
     private String drugStdcdRemark;
     private String remark;
     private Date updDatetime;
     private String updUser;


    // Constructors

    /** default constructor */
    public StdDruginfoDetail() {
    }

    
    /** full constructor */
    public StdDruginfoDetail(Short drugAttr, Integer drugIndex, String pharId, Short patternType, Short drugSource, Short isLowprice, Short isAgriculture, Short isHealthcare, String drugStdCode, String drugStdcdRemark, String remark, Timestamp updDatetime, String updUser) {
        this.drugAttr = drugAttr;
        this.drugIndex = drugIndex;
//        this.pharId = pharId;
        this.patternType = patternType;
        this.drugSource = drugSource;
        this.isLowprice = isLowprice;
        this.isAgriculture = isAgriculture;
        this.isHealthcare = isHealthcare;
        this.drugStdCode = drugStdCode;
        this.drugStdcdRemark = drugStdcdRemark;
        this.remark = remark;
        this.updDatetime = updDatetime;
        this.updUser = updUser;
    }

   
    // Property accessors
    @Id
    @Column(name="drug_id", unique=true, nullable=false, length=36)

    public String getDrugId() {
        return this.drugId;
    }
    
    public void setDrugId(String drugId) {
        this.drugId = drugId;
    }
    
    @Column(name="drug_attr")

    public Short getDrugAttr() {
        return this.drugAttr;
    }
    
    public void setDrugAttr(Short drugAttr) {
        this.drugAttr = drugAttr;
    }
    
    @Column(name="drug_index")

    public Integer getDrugIndex() {
        return this.drugIndex;
    }
    
    public void setDrugIndex(Integer drugIndex) {
        this.drugIndex = drugIndex;
    }
    
//    @Column(name="phar_id", length=36)
//
//    public String getPharId() {
//        return this.pharId;
//    }
//    
//    public void setPharId(String pharId) {
//        this.pharId = pharId;
//    }
    
    @Column(name="pattern_type")

    public Short getPatternType() {
        return this.patternType;
    }
    
    public void setPatternType(Short patternType) {
        this.patternType = patternType;
    }
    
    @Column(name="drug_source")

    public Short getDrugSource() {
        return this.drugSource;
    }
    
    public void setDrugSource(Short drugSource) {
        this.drugSource = drugSource;
    }
    
    @Column(name="is_lowprice")

    public Short getIsLowprice() {
        return this.isLowprice;
    }
    
    public void setIsLowprice(Short isLowprice) {
        this.isLowprice = isLowprice;
    }
    
    @Column(name="is_agriculture")

    public Short getIsAgriculture() {
        return this.isAgriculture;
    }
    
    public void setIsAgriculture(Short isAgriculture) {
        this.isAgriculture = isAgriculture;
    }
    
    @Column(name="is_healthcare")

    public Short getIsHealthcare() {
        return this.isHealthcare;
    }
    
    public void setIsHealthcare(Short isHealthcare) {
        this.isHealthcare = isHealthcare;
    }
    
    @Column(name="drug_std_code", length=128)

    public String getDrugStdCode() {
        return this.drugStdCode;
    }
    
    public void setDrugStdCode(String drugStdCode) {
        this.drugStdCode = drugStdCode;
    }
    
    @Column(name="drug_stdcd_remark", length=1024)

    public String getDrugStdcdRemark() {
        return this.drugStdcdRemark;
    }
    
    public void setDrugStdcdRemark(String drugStdcdRemark) {
        this.drugStdcdRemark = drugStdcdRemark;
    }
    
    @Column(name="remark", length=4000)

    public String getRemark() {
        return this.remark;
    }
    
    public void setRemark(String remark) {
        this.remark = remark;
    }
    
    @Column(name="upd_datetime", length=19)

    public Date getUpdDatetime() {
        return this.updDatetime;
    }
    
    public void setUpdDatetime(Date updDatetime) {
        this.updDatetime = updDatetime;
    }
    
    @Column(name="upd_user", length=36)

    public String getUpdUser() {
        return this.updUser;
    }
    
    public void setUpdUser(String updUser) {
        this.updUser = updUser;
    }
   
    @javax.persistence.ManyToOne(cascade = { CascadeType.ALL })
	@NotFound(action=NotFoundAction.IGNORE)
	@JoinColumn(name = "phar_id")
    public DicPhar getPhar() {
		return phar;
	}


	public void setPhar(DicPhar phar) {
		this.phar = phar;
	}

	






}